package com.example.demo.service.Impl;

import com.example.demo.mapper.ScheduleMapper;
import com.example.demo.pojo.Schedule;
import com.example.demo.service.ScheduleService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.Date;
import java.util.List;

/**
 * @Project:demo
 * @Description: 员工排班实现类
 * @Author: Mr.Hunter
 * @Date:2023/5/25/16:23
 */
@Service
public class ScheduleServiceImpl implements ScheduleService {
    @Autowired
    private ScheduleMapper scheduleMapper;


    @Override
    public Integer insertScheduleByWorkDateAndStoreId(Integer storeId, Integer staffId, String workDate, String staffSchedule) {
        return scheduleMapper.insertScheduleByWorkDateAndStoreId(storeId,staffId,workDate,staffSchedule);
    }

    @Override
    public Integer updateStaffScheduleByWorkDateAndStoreId(Integer storeId, Integer staffId, String workDate, String staffSchedule) {
        return scheduleMapper.updateStaffScheduleByWorkDateAndStoreId(storeId,staffId,workDate,staffSchedule);
    }

    @Override
    public List<Schedule> selectStaffScheduleByStoreIdAndStaffIdAndWorkDate(Integer storeId, Integer staffId, String workDate) {
        return scheduleMapper.selectStaffScheduleByStoreIdAndStaffIdAndWorkDate(storeId,staffId,workDate);
    }

    @Override
    public List<Schedule> selectStaffScheduleByStoreIdAndWorkDate(Integer storeId, String workDate) {
        return scheduleMapper.selectStaffScheduleByStoreIdAndWorkDate(storeId,workDate);
    }


}